package com.zdp.mybatisplus.controller;

import com.zdp.mybatisplus.entity.Member;
import com.zdp.mybatisplus.mapper.master.MemberMasterMapper;
import com.zdp.mybatisplus.service.master.MemberMasterService;
import com.zdp.mybatisplus.service.slave.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author sesshomaru
 * @date 2019/12/4 14:39
 */
@RestController
public class TestController {
    @Autowired
    private MemberService memberService;

    @Autowired
    private MemberMasterService memberMasterService;

    @Autowired

    @RequestMapping("/test")
    public Map<String,Object> test(){
        Map<String,Object> map = new HashMap<>();
        Member member = memberService.selectByPrimaryKey(29L);
        map.put("data",member);
        memberMasterService.deleteByPrimaryKey(28L);
        return map;
    }
}
